var dbUtil = {};
var mysql = require('mysql')



dbUtil.query=function (sql,params,callback) {
    var connection = mysql.createConnection({
        host:'localhost',
        user:'root',
        password:'123456',
        database:'demo'
    })

    connection.connect();

    connection.query(sql,params,function (error,results,field) {
        callback(error,results,field);
    })

    connection.end();
}


module.exports = dbUtil;